from langchain_core.runnables import RunnableConfig

from owl_ai.graph.graph_node import BaseGraphNode


class ChatLLMGraphNode(BaseGraphNode):

    def __init__(self,  node_config: dict):
        llm_config = node_config.get("llm_config")

        self.chat_llm = self.chat_llm_generate(llm_config=llm_config)
        self.system_prompt = node_config.get("systemPrompt")
        self.user_prompt = node_config.get("userPrompt")

    def __call__(self, state, config: RunnableConfig):
        history_messages = state.get("messages")

        llm_messages = []
        